#import "OliveBrightenController.h"
        
#import "OliveBrightenModel.h"
#import "OliveBrightenCell.h"
#import "Masonry.h"

@interface OliveBrightenController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *wonderCollectionView;
@property (nonatomic, strong) NSMutableArray *zealArr;

@end

@implementation OliveBrightenController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self marbleUnveilSetupview];
	[self delightfulVividCuriousgetData];
}


//: 获取数据模型
- (void)delightfulVividCuriousgetData {
	
}

- (void)marbleUnveilSetupview {
    UICollectionViewFlowLayout *zipperWandererMerge = [[UICollectionViewFlowLayout alloc] init];
    zipperWandererMerge.minimumLineSpacing = 10;
    zipperWandererMerge.minimumInteritemSpacing = 10;
    zipperWandererMerge.itemSize = CGSizeMake(100, 100);
    zipperWandererMerge.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.wonderCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:zipperWandererMerge];
    self.wonderCollectionView.backgroundColor = UIColor.clearColor;
    self.wonderCollectionView.delegate = self;
    self.wonderCollectionView.dataSource = self;
    self.wonderCollectionView.showsHorizontalScrollIndicator = NO;
    self.wonderCollectionView.showsVerticalScrollIndicator = NO;
    [self.wonderCollectionView registerClass:[OliveBrightenCell class] forCellWithReuseIdentifier:NSStringFromClass([OliveBrightenCell class])];
    
    [self.view addSubview:self.wonderCollectionView];
    [self.wonderCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

//: 懒加载数据模型数组
- (NSMutableArray *)zealArr {
	if (!_zealArr) {
		_zealArr = [NSMutableArray array];
	}
	return _zealArr;
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.zealArr.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    OliveBrightenCell *luminescenceWanderXenial = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([OliveBrightenCell class]) forIndexPath:indexPath];
    return luminescenceWanderXenial;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
